package com.fjnldx.mes.domain.pojo.alarm.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 触发条件
 */
public enum TriggerConditionEnum {
    GREATER(">", 0),
    LESS("<", 1),
    EQUAL("=", 2),
    GREATER_EQUAL(">=", 3),
    LESS_EQUAL("<=", 4),
    NOT_EQUAL("!=", 5);

    private final String operator;

    @JsonValue
    @EnumValue
    private final Integer value;

    TriggerConditionEnum(String operator, Integer value) {
        this.operator = operator;
        this.value = value;
    }

    public String getOperator() {
        return operator;
    }

    public Integer getValue() {
        return value;
    }
}
